<include file="public@meta" />

<body>
<div class="layui-fluid">
    <div class="layui-card-body">
        <form method="post" class="layui-form layui-col-md6" action="{:url('admin/AuthGroup/edit')}">
            <div class="layui-form-item">
                <label class="layui-form-label">名称<span class="form-required">*</span></label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" name="title" value="{$data['title']}"
                           placeholder="请输入权限组名称">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="input-status" class="layui-form-label">状态</label>
                <div class="layui-input-inline">
                    <input type="radio" class="layui-input" name="status" value="1" title="是" <if condition="$data['status'] eq 1">checked="checked"</if> >
                    <input type="radio" class="layui-input" name="status" value="0" title="否" <if condition="$data['status'] eq 0"> checked="checked"</if> >
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-block">
                    <textarea class="layui-textarea" name="remark" placeholder="您可以输入备注">{$data['remark']}</textarea>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <input type="hidden" name="id" value="{$data['id']}">
                <input type="button" lay-submit lay-filter="layui-btn-form-submit" id="layui-btn-form-submit" value="确认添加">
                <input type="button" lay-submit lay-filter="layui-btn-form-edit" id="layui-btn-form-edit" value="确认编辑">
            </div>
        </form>
    </div>
</div>

<script>
    layui.config({
        base: '__STATIC__/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        layCenter: 'lib/layCenter', //主入口模块
    }).use(['index', 'form','layCenter','common'], function(){
        var $ = layui.$,
            form = layui.form,
            layCenter = layui.layCenter,
            common = layui.common;
        //监听提交
        form.on('submit(layui-btn-form-submit)', function(data){
            layCenter.FormSubmit("{:url('edit')}",data.field,true);
        });

    });
</script>
</body>
</html>